package cn.edu.sgu.www.mhxysy.service.zuoqi.impl;

import cn.edu.sgu.www.mhxysy.entity.zuoqi.ZuoqiSkill;
import cn.edu.sgu.www.mhxysy.entity.zuoqi.ZuoqiSkillCategory;
import cn.edu.sgu.www.mhxysy.mapper.zuoqi.ZuoqiSkillMapper;
import cn.edu.sgu.www.mhxysy.service.zuoqi.ZuoqiSkillService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Service
public class ZuoqiSkillServiceImpl implements ZuoqiSkillService {

	private final ZuoqiSkillMapper zuoqiSkillMapper;

	@Autowired
	public ZuoqiSkillServiceImpl(ZuoqiSkillMapper zuoqiSkillMapper) {
		this.zuoqiSkillMapper = zuoqiSkillMapper;
	}

	@Override
	public ZuoqiSkill selectByZuoqiId(String zuoqiId) {
		QueryWrapper<ZuoqiSkill> queryWrapper = new QueryWrapper<>();

		queryWrapper.eq("zuoqi_id", zuoqiId);

		return zuoqiSkillMapper.selectOne(queryWrapper);
	}

	@Override
	public ZuoqiSkillCategory selectByChongwuId(String chongwuId) {
		return zuoqiSkillMapper.selectByChongwuId(chongwuId);
	}

}